package com.pentofab.payrollmanagement.dao.model;

import java.util.ArrayList;

public class EmployeeDetail {
	
	private String name; 
	private String epId;
    private String DOB; 
    private String DOJ; 
    private String company; 
    private String department;
    private String designation;
    private String createdBy;
    private String modifiedBy;
    private String deletedBy;
    private String deletionDate;
    private String  unit;
    
	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEpId() {
		return epId;
	}

	public void setEpId(String epId) {
		this.epId = epId;
	}

	public String getDOB() {
		return DOB;
	}

	public void setDOB(String dOB) {
		DOB = dOB;
	}

	public String getDOJ() {
		return DOJ;
	}

	public void setDOJ(String dOJ) {
		DOJ = dOJ;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getDepartment() {
		return department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public String getDesignation() {
		return designation;
	}

	public void setDesignation(String designation) {
		this.designation = designation;
	}

	public String getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public String getModifiedBy() {
		return modifiedBy;
	}

	public void setModifiedBy(String modifiedBy) {
		this.modifiedBy = modifiedBy;
	}

	public String getDeletedBy() {
		return deletedBy;
	}

	public void setDeletedBy(String deletedBy) {
		this.deletedBy = deletedBy;
	}

	public String getDeletionDate() {
		return deletionDate;
	}

	public void setDeletionDate(String deletionDate) {
		this.deletionDate = deletionDate;
	}

	public static ArrayList<EmployeeDetail> getEmployeeDetail(
			ArrayList<Employee> empList) {
    	
		ArrayList<EmployeeDetail> detail = new ArrayList<EmployeeDetail>();
		
		for (int i = 0; i < empList.size(); i++) {
			Employee cur = empList.get(i);
			detail.add(new EmployeeDetail(
					cur.getEmpName(),cur.getEmpId(),cur.getDOB(),cur.getDOJ(),
					cur.getCompany().getName(),
					cur.getDepertment().getDescription(),
					cur.getDesignation().getDescription(),
					cur.getCreatedby(),
					cur.getModifiedBy(),
					cur.getDeletedBy(),
					cur.getDeletionDate(),
					cur.getUnit()
					));
		}
		
		return detail;

	}

	public EmployeeDetail(String name, String epId, String dOB, String dOJ,
			String company, String department, String designation,
			String createdBy, String modifiedBy, String deletedBy,
			String deletionDate, String unit) {
		
		this.name = name;
		this.epId = epId;
		DOB = dOB;
		DOJ = dOJ;
		this.company = company;
		this.department = department;
		this.designation = designation;
		this.createdBy = createdBy;
		this.modifiedBy = modifiedBy;
		this.deletedBy = deletedBy;
		this.deletionDate = deletionDate;
		this.unit = unit;
	}

	
	
	
}
